# Maintainer: Tobias Powalowski <tpowa@archlinux.org>

pkgname=progsreiserfs
pkgver=0.3.0.5
pkgrel=9
pkgdesc="library for accessing and manipulating reiserfs partitions"
arch=(x86_64)
url="http://www.namesys.com"
license=('GPL')
depends=('e2fsprogs')
source=(#ftp://ftp.namesys.com/pub/libreiserfs/${pkgname}-${pkgver}.tar.gz
	https://sources.archlinux.org/other/progsreiserfs/${pkgname}-${pkgver}.tar.gz
        fix-underquoted-definition.patch
	)
sha512sums=('e2b94c778796492e66578b3dde8601d8670c11344dca2082eccf648f8bf26a226d07c26333d91357b081c50b09aed4b7f9a5bb1a6c985808c55db02c83e24ce3'
            '2450b032af7141a90c69584ca4f4d0830a12c35525829d0850207734c218dd83e1d4f49236e835fb93992ac8d4d310d4d63db7038aa49bac32ec60d828cc0bbf')

build()        {
        cd ${srcdir}/${pkgname}-${pkgver}
        patch -Np0 -i ../fix-underquoted-definition.patch
        ./configure --prefix=/usr --mandir=/usr/share/man 
        make
}
package() {
        cd ${srcdir}/${pkgname}-${pkgver} 
        make DESTDIR=${pkgdir} install
        # only provide lib and includes files
        # https://bugs.archlinux.org/task/22255
        rm -r ${pkgdir}/usr/sbin
	rm -r ${pkgdir}/usr/share/man/
}
